﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UAgentMacKeepDetailAdd.aspx.cs" Inherits="IHISCETeim.Web.AgentSys.SvrMgr.UAgentMacKeepDetailAdd" %>
<div class="pageContent">
    <form id="Form1" action="SvrMgr/UAgentMacKeepDetailAdd.aspx?ajaxmethod=<%=Action %>&UMKDID=<%=UMKDID %>&Action=<%=Action %>"   class="pageForm required-validate" onsubmit="return validateCallback(this,dialogAjaxDone);">
    <div class="pageFormContent"  layoutH="56">
        <p>
				<label>机号：</label>
				<input name="SerialNumber"  type="text" readonly  value="<%=UMacKeepDetailObj.SerialNumber %>" />
		</p>
        <p>
				<label>保养时间：</label>
				<input name="KeepHours"  type="text"  readonly  value="<%=UMacKeepDetailObj.KeepHours %>" />
		</p>
        <p>
				<label>工作小时：</label>
				 <input type="text" name="WorkTime" class="inputFloat required" value="<%=UMacKeepDetailObj.WorkTime %>"/>
		</p>
        <p>
				<label>保养日期：</label>
				 <input type="text" name="KeepDate" class="date required"  value="<%=UMacKeepDetailObj.KeepDate %>"/>
		</p>

        <table style=" border-collapse:separate;border-spacing:5;">
             <tr>
                <td>
                    服务报告扫描：
                </td>
                <td>
                    <input type="hidden" name="ScanImg" id="UMacKeepDetailScanImg" value="<%=UMacKeepDetailObj.ScanImg %>">
                    <input type='file' name='filedata' id='imgUMacKeepDetailScanImg' upload='upload' clientId='imgUMacKeepDetailShow,UMacKeepDetailScanImg' dirtype='6' foldername='<%=User.Department %>' onUploadSuccess='onUMacKeepDetailUploadImgSuccess' fileTypeDesc='只能上传图片' fileTypeExts='*.jpg;*.gif;*.jpeg;*.png;*.bmp' fileSizeLimit='1MB'/>
                    
                </td>
                <td >
                    <a href="<%=UMacKeepDetailObj.ScanImg %>" class="imgUMacKeepDetailShow"><img id="imgUMacKeepDetailShow" src="<%=UMacKeepDetailObj.ScanImg %>" width="30" height="30"></a>
                </td>
                <td colspan="2">
                    <a href="#" onclick="onUMacKeepDetailDeleteImg('UMacKeepDetailScanImg','imgUMacKeepDetailShow')">删除</a>
                </td>
            </tr>
             <tr>
                <td>
                    机号图片：
                </td>
                <td>
                    <input type="hidden" name="JHScanImg" id="UMacKeepDetailJHScanImg" value="<%=UMacKeepDetailObj.JHScanImg %>">
                    <input type='file' name='filedata' id='imgUMacKeepDetailJHScanImg' upload='upload' clientId='imgUMacKeepDetailShowJHScanImg,UMacKeepDetailJHScanImg' dirtype='6' foldername='<%=User.Department %>' onUploadSuccess='onUMacKeepDetailUploadImgSuccess' fileTypeDesc='只能上传图片' fileTypeExts='*.jpg;*.gif;*.jpeg;*.png;*.bmp' fileSizeLimit='1MB'/>
                    
                </td>
                <td >
                    <a href="<%=UMacKeepDetailObj.JHScanImg %>" class="imgUMacKeepDetailShow"><img id="imgUMacKeepDetailShowJHScanImg" src="<%=UMacKeepDetailObj.JHScanImg %>" width="30" height="30"></a>
                </td>
                <td colspan="2">
                    <a href="#" onclick="onUMacKeepDetailDeleteImg('UMacKeepDetailJHScanImg','imgUMacKeepDetailShowJHScanImg')">删除</a>
                </td>
            </tr>
             <tr>
                <td>
                    小时数图片：
                </td>
                <td>
                    <input type="hidden" name="TimerScanImg" id="UMacKeepDetailTimerScanImg" value="<%=UMacKeepDetailObj.TimerScanImg %>">
                    <input type='file' name='filedata' id='imgUMacKeepDetailTimerScanImg' upload='upload' clientId='imgUMacKeepDetailShowTimerScanImg,UMacKeepDetailTimerScanImg' dirtype='6' foldername='<%=User.Department %>' onUploadSuccess='onUMacKeepDetailUploadImgSuccess' fileTypeDesc='只能上传图片' fileTypeExts='*.jpg;*.gif;*.jpeg;*.png;*.bmp' fileSizeLimit='1MB'/>
                    
                </td>
                <td >
                    <a href="<%=UMacKeepDetailObj.TimerScanImg %>" class="imgUMacKeepDetailShow"><img id="imgUMacKeepDetailShowTimerScanImg" src="<%=UMacKeepDetailObj.TimerScanImg %>" width="30" height="30"></a>
                </td>
                <td colspan="2">
                    <a href="#" onclick="onUMacKeepDetailDeleteImg('UMacKeepDetailTimerScanImg','imgUMacKeepDetailShowTimerScanImg')">删除</a>
                </td>
            </tr>
             <tr>
                <td>
                    保养件图片：
                </td>
                <td>
                    <input type="hidden" name="BYJScanImg" id="UMacKeepDetailBYJScanImg" value="<%=UMacKeepDetailObj.BYJScanImg %>">
                    <input type='file' name='filedata' id='imgUMacKeepDetailBYJScanImg' upload='upload' clientId='imgUMacKeepDetailShowBYJScanImg,UMacKeepDetailBYJScanImg' dirtype='6' foldername='<%=User.Department %>' onUploadSuccess='onUMacKeepDetailUploadImgSuccess' fileTypeDesc='只能上传图片' fileTypeExts='*.jpg;*.gif;*.jpeg;*.png;*.bmp' fileSizeLimit='1MB'/>
                    
                </td>
                <td >
                    <a href="<%=UMacKeepDetailObj.BYJScanImg %>" class="imgUMacKeepDetailShow"><img id="imgUMacKeepDetailShowBYJScanImg" src="<%=UMacKeepDetailObj.BYJScanImg %>" width="30" height="30"></a>
                </td>
                <td colspan="2">
                    <a href="#" onclick="onUMacKeepDetailDeleteImg('UMacKeepDetailBYJScanImg','imgUMacKeepDetailShowBYJScanImg')">删除</a>
                </td>
            </tr>
             <tr>
                <td>
                    与机器合影图片：
                </td>
                <td>
                    <input type="hidden" name="HYScanImg" id="UMacKeepDetailHYScanImg" value="<%=UMacKeepDetailObj.HYScanImg %>">
                    <input type='file' name='filedata' id='imgUMacKeepDetailHYScanImg' upload='upload' clientId='imgUMacKeepDetailShowHYScanImg,UMacKeepDetailHYScanImg' dirtype='6' foldername='<%=User.Department %>' onUploadSuccess='onUMacKeepDetailUploadImgSuccess' fileTypeDesc='只能上传图片' fileTypeExts='*.jpg;*.gif;*.jpeg;*.png;*.bmp' fileSizeLimit='1MB'/>
                    
                </td>
                <td >
                    <a href="<%=UMacKeepDetailObj.HYScanImg %>" class="imgUMacKeepDetailShow"><img id="imgUMacKeepDetailShowHYScanImg" src="<%=UMacKeepDetailObj.HYScanImg %>" width="30" height="30"></a>
                </td>
                <td colspan="2">
                    <a href="#" onclick="onUMacKeepDetailDeleteImg('UMacKeepDetailHYScanImg','imgUMacKeepDetailShowHYScanImg')">删除</a>
                </td>
            </tr>
        </table>
        <table  style=" border-collapse:separate;border-spacing:5;">
             <tr>
                 <td colspan="3" style="line-height:25px; background-color:yellow;" >
                     服务担当审核:
                 </td>
             </tr>
            <tr>
                <td>
                    <input name="IsSHChange" type="checkbox" <%=HasPower(IHISCETeim.Web.Permission.经销商平台_公司人员)?"":"disabled" %>  value="true" <%=UMacKeepDetailObj.IsSHChange?"checked":"" %> />                    
                </td>
                <td>
                    1.是否有按照规定保养项目进行更换保养件?
                </td>
                <td>
                    <input name="IsSHChangeText"  type="text" <%=HasPower(IHISCETeim.Web.Permission.经销商平台_公司人员)?"":"disabled" %>  value="<%=UMacKeepDetailObj.IsSHChangeText %> "/>
                </td>
                 </tr>
             <tr>
                 <td>
                    <input name="IsSHWater" type="checkbox" <%=HasPower(IHISCETeim.Web.Permission.经销商平台_公司人员)?"":"disabled" %> value="true" <%=UMacKeepDetailObj.IsSHWater?"checked":"" %> />                    
                </td>
                <td>
                    2.照片是否有日期水印?
                </td>
                <td>
                    <input name="IsSHWaterText" type="text" <%=HasPower(IHISCETeim.Web.Permission.经销商平台_公司人员)?"":"disabled" %> value="<%=UMacKeepDetailObj.IsSHWaterText %> "/>
                </td>
             </tr>
             <tr>
                 <td>
                    <input  name="IsSHGuiHan" type="checkbox" <%=HasPower(IHISCETeim.Web.Permission.经销商平台_公司人员)?"":"disabled" %> value="true" <%=UMacKeepDetailObj.IsSHGuiHan?"checked":"" %> />                    
                </td>
                <td>
                    3.服务现场是否规范?
                </td>
                <td>
                    <input name="IsSHGuiHanText" type="text"  <%=HasPower(IHISCETeim.Web.Permission.经销商平台_公司人员)?"":"disabled" %> value="<%=UMacKeepDetailObj.IsSHGuiHanText %> "/>
                </td>
            </tr>
            <tr>
                 <td>
                    <input  name="IsFirstOil" type="checkbox" <%=HasPower(IHISCETeim.Web.Permission.经销商平台_公司人员)?"":"disabled" %> value="true" <%=UMacKeepDetailObj.IsFirstOil?"checked":"" %> />                    
                </td>
                <td>
                    4.质保期内是否使用第一品牌保养件及油品?
                </td>
                <td>
                    <input name="IsFirstOilText" type="text"  <%=HasPower(IHISCETeim.Web.Permission.经销商平台_公司人员)?"":"disabled" %> value="<%=UMacKeepDetailObj.IsFirstOilText %> "/>
                </td>
            </tr>
        </table>
        <div style="color:red; font-weight:bold;">
            请按上述审核要求落实工作，未达标项目将根据规定扣罚此单服务费用，请务必认真执行
        </div>
     </div>
    <div class="formBar">
        <ul>
             <%if(HasPower(IHISCETeim.Web.Permission.新增)){ %>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            保存</button></div>
                </div>
            </li>
             <%} %>

            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">
                            取消</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</div>

<script>
    $(document).ready(function () {      

        $("a.imgUMacKeepDetailShow").fancybox();
        setTimeout(function () {
            $(":file[upload]").each(function () {
                uploadifyFun($(this));
            });
        }, 500)
    })


    function onUMacKeepDetailUploadImgSuccess(file, data, response) {
        if (!response)
            return false;
        data = eval("(" + data + ")");
        if (!data.uploadResult) {
            alert(data.errMsg);
            return;
        }
        var $imgUploadPath = data.filePath;
        var $trageIds = data.customerInfo.split(",");
        $("#" + $trageIds[0]).attr("src", $imgUploadPath);
        $("#" + $trageIds[1]).val($imgUploadPath);

        $("#" + $trageIds[0]).closest("a").attr("href", $imgUploadPath).fancybox();
    }
    function onUMacKeepDetailDeleteImg(hiddenid, imgid) {
        $("#" + imgid).attr("src", "");
        $("#" + hiddenid).val("");
    }
</script>
